 |
 all status ~Kirk Breresalyli 11/02/2009 12:41 AM Domino Designer All Releases All Platforms
Below is my reporting code: It only works with 1 status - vstatus=Cstr(dialog.Status(0)). As Status is a multi-value field, what is a quick way to get multiple status values selected from the dialog box?
continue = ws.DialogBox("DepartmentDialog",True, True, False, False, False, False,"Department Query",Dialog, True)
Set uiview = ws.CurrentView
Set view = uiview.View
sdate=Cstr(dialog.StartDate(0))
edate=Cstr(dialog.EndDate(0))
vstatus=Cstr(dialog.Status(0))
searchstring=Cstr(dialog.Department(0))
NewFormula = |SELECT (@Begins(Department;"|& searchstring & |")) & status="| & vstatus & |" & DateStamp > [| & sdate & |] & DateStamp < [| & edate & |]|
If vstatus<>"" Then
NewFormula = |SELECT (@Begins(Department;"|& searchstring & |"))& status="| & vstatus & |" & ScheduledFinish > [| & sdate & |] & ScheduledFinish < [| & edate & |]|
End If
If vstatus="" Then
NewFormula = |SELECT (@Begins(Department;"|& searchstring & |")) & DateStamp > [| & sdate & |] & DateStamp < [| & edate & |]|
End If
Set collection=db.search(NewFormula,Nothing,0)
If collection.Count=0 Then
Messagebox "No records are found......",MB_OK,"Report Status...."
Exit Sub
End If
If collection.Count>0 Then
Call collection.PutAllInFolder("SearchResult")
End If
Go back |